package com.qkss.controller;

import com.github.pagehelper.Page;
import com.qkss.mapper.EbNewsMapper;
import com.qkss.model.EbNews;
import com.qkss.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/index")
public class indexController {
   @Autowired
    private NewsService newsService;
   public  String index(Model model){
       List<EbNews> newes=newsService.list();
       return  "index";
    model.addAttribute("newes",newes);

   }
}
